Release 10.1A: OpenEdge Development:
Progress 4GL Handbook
Types of objects
The fill-in field is the simplest representation of a single data field. Other ways to represent data fields include:
- Editors — For longer text strings.
- Toggle boxes — For logical values.
- Selection lists — For lists of valid values.
- Combo boxes — For a list display that disappears when you’re not using it.
- Sliders — For visual display of an integer value within a range.
- Radio sets — For presenting a choice among a small set of distinct values.
Among objects that don’t display data values, you have already worked with buttons. In addition, Progress supports rectangles for highlighting and grouping other objects on the screen, and images to display pictures and diagrams. Menus and menu items for a window are other types of visual objects. Windows and frames are objects that serve as containers for other objects within a user interface.
The browse is a major visual object with many capabilities. Because of its special use as a display device for an entire query, a detailed discussion of how to use and customize the browse is postponed until Chapter 12, "Using the Browse Object," after you’ve learned more about how to define and use queries.
Various terms describe all these objects in general. The Progress language syntax often uses the term widget. In other places you see the word control. But there is such variety to the display devices Progress supports that this book refers to them all as objects. Sometimes this book refers to them as basic objects or simple objects, to differentiate them from SmartObjects™. SmartObjects are procedure-based and have a great deal of additional standard behavior built into them via the 4GL procedures that support them. The basic objects Progress supports run the gamut from very simple objects (such as rectangles, which are purely decorational) to complex data controls (such as the browse).
For all their variety, all basic objects have the following in common:
- You can define them in a Progress 4GL procedure using forms of the
DEFINEstatement. These are called static objects, and it is these that you’ll focus on in this chapter.- You can also create them during program execution using the
CREATEstatement. These are called dynamic objects, and you’ll learn much more about them in later chapters.- They can have a handle that acts as a pointer to a control structure that describes the object. Since handles are used mostly with dynamic objects, you’ll learn more about handles in the chapters on creating and using dynamic objects.
- They respond to various events that can come from user actions or can be applied to the object programmatically.
- They support blocks of 4GL code called triggers that Progress executes when an associated event occurs.
- They have various methods defined for them, which are procedural actions you can invoke in your programs to perform tasks related to the object.
In the next sections you’ll learn about object definitions, attributes, and methods.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |